package com.yj.ccs.abs.common.enums;

/**
 * Copyright 2018 (C) Yunjian-VC
 * Created on : 2018/3/15
 * Author     : Unbelievable9
 **/
public enum CompanyNatureType {

    /**
     * 1 - 国企
     * 2 - 民企
     * 3 - 国企(上市)
     * 4 - 民企(上市)
     */

    STATE_OWNED(1),
    PRIVATE(2),
    STATE_OWNED_LISTING(3),
    PRIVATE_LISTING(4);

    private final Integer value;

    CompanyNatureType(Integer value) {
        this.value = value;
    }

    public Integer getValue() {
        return value;
    }

    public static CompanyNatureType fromValue(Integer value) {
        for (CompanyNatureType companyNatureType : CompanyNatureType.values()) {
            if (companyNatureType.getValue().equals(value)) {
                return companyNatureType;
            }
        }

        return null;
    }
}
